package nextEntity

import (
	"gitee.com/fierce_wolf/go-fox-edge-common/commEntity"
	"gitee.com/fierce_wolf/go-fox-edge-common/commSql"
)

var (
	Type    entityType
	Manager entityManger
)

type entityType struct {
	CorpEntity       CorpEntity
	ConfEntity       ConfEntity
	SourceEntity     SourceEntity
	TagEntity        TagEntity
	UserEntity       UserEntity
	UserOnlineEntity UserOnlineEntity
}

func init() {
	commEntity.Factory.Register(&Type.CorpEntity)
	commEntity.Factory.Register(&Type.ConfEntity)
	commEntity.Factory.Register(&Type.SourceEntity)
	commEntity.Factory.Register(&Type.TagEntity)
	commEntity.Factory.Register(&Type.UserEntity)
	commEntity.Factory.Register(&Type.UserOnlineEntity)

	// 注册数据库实体
	commSql.Register(Type.CorpEntity.Type())
	commSql.Register(Type.ConfEntity.Type())
	commSql.Register(Type.SourceEntity.Type())
	commSql.Register(Type.TagEntity.Type())
	commSql.Register(Type.UserEntity.Type())
}
